package zy;

import java.util.Random;

public class Wu extends Thread {
	public void run(){
		int t=0;
		Random random=new Random();
		t=random.nextInt(2);
		t=t+1;
		for (int i=0;i<=20;){
			System.out.println("乌龟跑了"+i+"米");
			i=i+2;
			System.out.println("乌龟休息了"+t+"秒");		
			
		if(i>20){
			System.out.println("乌龟到终点了");
		}
	}
}
}

